/****** Object:  Stored Procedure [dbo].spLuuKhoUpdate Script Date: 8/6/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spLuuKhoUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spLuuKhoUpdate]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		07/08/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spLuuKhoUpdate]
(
	@MaLuuKho int,
	@MaThuoc nvarchar(12),
	@SoLo nvarchar(12),
	@MaKho nvarchar(5),
	@TongNhap int,
	@TongXuat int,
	@TonKho int,
	@HanDung nvarchar(50),
	@NgaySX datetime,
	@HanSuDung datetime
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_LuuKho]
SET [MaThuoc] = @MaThuoc,
	[SoLo] = @SoLo,
	[MaKho] = @MaKho,
	[TongNhap] = @TongNhap,
	[TongXuat] = @TongXuat,
	[TonKho] = @TonKho,
	[HanDung] = @HanDung,
	[NgaySX] = @NgaySX,
	[HanSuDung] = @HanSuDung
WHERE	[MaLuuKho] = @MaLuuKho
GO

--GRANT EXECUTE ON [dbo].[spLuuKhoUpdate] TO [sa]
--GO
